import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import FastClick from 'fastclick'
//import './utils/rem'
import Toast from './components/toast'
Vue.use(Toast)
import Loading from '@/components/loading'
Vue.use(Loading);
import Lay from '@/components/lay'
Vue.use(Lay);
import '@/assets/font.less';
import '@/style/global.less';
import yxpConfirm from '@/components/common/ConfirmModal/index'
import * as filters from '@/utils/vue-filter.js'
import YxpIcon from '@/components/common/YxpIcon'
Vue.use(YxpIcon)
FastClick.attach(document.body)
import {
  message,
  Button,
  Drawer,
  Icon
} from 'ant-design-vue';
import {
  http
} from '@/utils/request'
console.log('init.load.request', http)
Vue.use(Button)
  .use(Drawer)
  .use(Icon)

Vue.config.productionTip = false
Vue.prototype.$yxpConfirm = yxpConfirm;
Vue.prototype.$message = message;
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.directive('drag',{
  inserted: (el) => {
    let element = el;
    element.onmousemove = function(e) {
        e.stopPropagation()
    }
  }
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')